//
//  XDPickerCityView.h
//  kabu
//
//  Created by XiangDongMBP on 2017/3/6.
//  Copyright © 2017年 East. All rights reserved.
//

#import <UIKit/UIKit.h>

@class XDPickerCityView;
@protocol XDPickerCityViewDelegate <NSObject>
@optional

// Called when a button is clicked. The view will be automatically dismissed after this call returns
- (void)xDPickerCityView:(XDPickerCityView *)XDFilterView clickedButtonAtIndex:(NSInteger)buttonIndex;
- (void)xDPickerCityView:(XDPickerCityView *)XDFilterView province:(NSString *)province city:(NSString *)city;

@end

@interface XDPickerCityView : UIView

@property (nonatomic, weak)   id<XDPickerCityViewDelegate> delegate;

//- (instancetype)initWithTitles:(NSArray *)titles delegate:(id)delegate;
- (void)showInView:(UIView *)view;

// use this method when you need to explicitly dismiss the popup view.
// it does not need to be called if the user presses on a button
- (void)dismiss;

@end
